/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wisnu.spms.service.dao.impl;

import com.wisnu.spms.service.dao.DbBillingTypeDao;
import com.wisnu.spms.service.entity.DbBillingtype;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
import org.springframework.transaction.annotation.Transactional;

public class DbBillingTypeDaoImpl extends HibernateDaoSupport implements DbBillingTypeDao {

    @Override
    @Transactional(readOnly = true)
    public List<DbBillingtype> getBillingtypes() throws Exception {
        try {
            return getHibernateTemplate().loadAll(DbBillingtype.class);
        } catch (DataAccessException t) {
            throw new Exception(t.getMessage());
        }
    }

}
